package cn.briarbear.myblog.repository;

import cn.briarbear.myblog.entity.table.About;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;

@CacheConfig(cacheNames = "about")
public interface AboutRepository extends JpaRepository<About,Integer> {


    @CachePut(key = "#result.id")
    About save(About about);

    @Cacheable(key = "#p0")
    About findAboutById(Integer id);
}
